#pragma once

// c libs
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
#include <time.h>

// c++ libs
#include <vector>
#include <list>

#ifndef UNDER_CE
#include <iostream>
#include <sstream>
#endif  // UNDER_CE

#include <string>
#include <algorithm>

// platform libs
#include <Windows.h>
#ifdef UNDER_CE
#include <Mmsystem.h>
#endif  // UNDER_CE

// other libs
// - opengl
#ifndef UNDER_CE
#include <gl/gl.h>
#include <gl/GLU.h>
//#include <gl/GLAux.h>
//#include <mmsystem.h>
#else   // UNDER_CE
#include <gles/gl.h>
#include <egl/egl.h>
#endif  // UNDER_CE

// - sdl
#include <SDL/SDL.h>
#include <SDL/SDL_syswm.h>
#include <SDL/SDL_image.h>
#include <SDL/SDL_ttf.h>

// project libs
#include "classdeclare.h"
#include "commondef.h"
#include "debug.h"
#include "log.h"


// static libraries
#ifndef UNDER_CE
#pragma comment(lib, "OpenGL32.Lib")
#pragma comment(lib, "Glu32.lib")
//#pragma comment( lib, "winmm.lib")
#else   // UNDER_CE
#pragma comment(lib, "libEGL.lib")
#pragma comment(lib, "libGLESv1_CM.lib")
#endif  // UNDER_CE

#pragma comment(lib, "SDL.lib")
#pragma comment(lib, "SDLmain.lib")
#pragma comment(lib, "SDL_image.lib")
#pragma comment(lib, "SDL_ttf.lib")
#ifdef UNDER_CE
#pragma comment(lib, "Mmtimer.lib")
#endif  // UNDER_CE
#pragma comment(lib, "sqlite3.lib")

// using namespaces


// type cast warning, maybe lost data
#pragma warning(disable: 4244)
// do while(0) warning, conditional expression is constant
#pragma warning(disable: 4127)
// The file contains a character that cannot be represented in the current code page (936). Save the file in Unicode format to prevent data loss
#pragma warning(disable: 4819)



